﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace SDCloudSolution.SDCloud.Entities.Models
{
    /// <summary>
    /// Represents a model information entity.
    /// </summary>
    [Table("model")]
    public class ModelEntity
    {
        /// <summary>
        /// The model identifier.
        /// </summary>
        [Column("Id")]
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// The model indetifier to original model from public gallery.
        /// </summary>
        [Column("OriginalModelId")]
        public int? OriginalModelId { get; set; }

        /// <summary>
        /// The user identifier that creates this model instance.
        /// </summary>
        [Column("UserId")]
        public int UserId { get; set; }

        /// <summary>
        /// The date when this model was creates (UTC).
        /// </summary>
        [Column("CreatedDateUtc")]
        public DateTime CreatedDateUtc { get; set; }

        /// <summary>
        /// The date when this model was modified (UTC).
        /// </summary>
        [Column("ModifyDateUtc")]
        public DateTime? ModifyDateUtc { get; set; }

        /// <summary>
        /// The model display name.
        /// </summary>
        [Column("Name")]
        public string Name { get; set; }

        /// <summary>
        /// The model description text.
        /// </summary>
        [Column("Description")]
        public string Description { get; set; }

        /// <summary>
        /// The name of file that store a xmile structure of model.
        /// </summary>
        [Column("FileName")]
        public string FileName { get; set; }

        /// <summary>
        /// Indicates that this model should be shown at gallery.
        /// </summary>
        [Column("IsPublic")]
        public bool IsPublic { get; set; }
    }
}
